home *** CD-ROM | disk | FTP | other *** search
- /*
- ** This source code was written by Tim Endres
- ** Email: time@ice.com.
- ** USMail: 8840 Main Street, Whitmore Lake, MI 48189
- **
- ** Some portions of this application utilize sources
- ** that are copyrighted by ICE Engineering, Inc., and
- ** ICE Engineering retains all rights to those sources.
- **
- ** Neither ICE Engineering, Inc., nor Tim Endres,
- ** warrants this source code for any reason, and neither
- ** party assumes any responsbility for the use of these
- ** sources, libraries, or applications. The user of these
- ** sources and binaries assumes all responsbilities for
- ** any resulting consequences.
- */
-
- #ifdef TCL_MAJOR_VERSION
- # define Tcl_UnixError Tcl_PosixError
- #else
- # define TclSetEnv tcl_setenv
- #endif
-
- #define kSysFolderTag "SYSTEM_FOLDER"
- #define kSystemVersionTag "SYSTEM_VERSION"
- #define kMachineNameTag "MACHINE_NAME"
- #define kLoginnameTag "LOGIN"
- #define kTempFolderTag "TEMP"
- #define kAppleMenuFolderTag "APPLE_MENU_FOLDER"
- #define kCPFolderTag "CP_FOLDER"
- #define kDeskFolderTag "DESK_FOLDER"
- #define kExtFolderTag "EXT_FOLDER"
- #define kPrefFolderTag "PREF_FOLDER"
- #define kPrintMonFolderTag "PRINT_MON_FOLDER"
- #define kShTrashFolderTag "SHARED_TRASH_FOLDER"
- #define kTrashFolderTag "TRASH_FOLDER"
- #define kStartUpFolderTag "START_UP_FOLDER"
- #define kApplicationDirTag "APPDIR"
- #define kAppFileNameTag "APPNAME"
- #define kDefaultDirTag "PWD"
- #define kHomeDirTag "HOME"
- #define kDirPathTag "PATH"
-
- #ifndef TRUE
- # define TRUE 1
- #endif
- #ifndef FALSE
- # define FALSE 0
- #endif
-
- #ifdef macintosh
- /*
- ** Difference between Mac and Unix times
- */
- # define TIMEDIFF 0x7c25b080
- #endif
-
- /*
- ** This is *very* gross!
- ** These macros only apply in the commands:
- ** ls
- ** echo
- **
- ** Because Think_C did not adopt the sane translations
- ** provided by MPW, you have inconsistant behavior between
- ** normal CR delimited text windows, and the stupid NL
- ** delimited Console Window (Think's shell environment).
- ** Therefore, we need to define the line delimiter for
- ** the application. If you are putting data into a CR
- ** delimited window, and you're in ThinkC, you will need
- ** to define this as "\r". If you are in ThinkC and using
- ** the console window, then use "\n". If you are using
- ** MPW, then it is "\n" no matter what the environment.
- */
- #ifdef THINK_C
- # ifdef TCLAPPL
- # define SHELL_LINE_SEPER_STR "\r"
- # define SHELL_LINE_SEPER_CHAR '\r'
- # else
- # define SHELL_LINE_SEPER_STR "\n"
- # define SHELL_LINE_SEPER_CHAR '\n'
- # endif
- #else
- # define SHELL_LINE_SEPER_STR "\n"
- # define SHELL_LINE_SEPER_CHAR '\n'
- #endif
-
-
- #ifdef ALLOCATE_GLOBALS
-
- #define ALLOC_CLASS
- #define ALLOC_INIT(def) = def
- #define ALLOC_ARRAY(asize) [asize]
-
- #else
-
- #define ALLOC_CLASS extern
- #define ALLOC_INIT(def)
- #define ALLOC_ARRAY(asize) []
-
- #endif
-
- ALLOC_CLASS char *custom_name ALLOC_INIT("tcl");
- ALLOC_CLASS char *custom_longname ALLOC_INIT("tickle");
-
- ALLOC_CLASS int patchlevel
- #ifdef TCL_PATCH_LEVEL
- ALLOC_INIT( TCL_PATCH_LEVEL );
- #else
- ALLOC_INIT(0);
- #endif
- ALLOC_CLASS char *tcl_version
- #ifdef TCL_VERSION
- ALLOC_INIT(TCL_VERSION);
- #else
- ALLOC_INIT("7.0");
- #endif
-
-
- #define SFSaveDisk (* (short *) 0x0214)
- #define CurDirStore (* (long *) 0x0398)
-
- typedef int (*TCLPFI)();
-
- extern int tcl_handle_output();
-
- Handle tcl_Houtput_sethdl();
- extern TCLPFI Tcl_SetPrintProcedure();
- extern TCLPFI Tcl_GetPrintProcedure();
- extern int tcl_dev_null_output();
- extern int tcl_handle_output();
-
- extern int _tclmac_user_interrupt_;
-